package com.boot.main.exception;

public enum ExceptionEnum {
    BAD_REQUEST(400, "请求数据格式不正确!"),
    UNAUTHORIZEN(401, "登录凭证过期!"),
    UNLOGIN(402, "没有登录!"),
    FORBIDDEN(403, "没有访问权限!"),
    NOT_FOUND(404, "请求的资源找不到!"),
    TOKENNULL(406, "token为空，请重新登录!"),
    FILE_UPLOAD_ERROR(407, "文件上传异常!"),
    INTERNAL_SERVER_ERROR(500, "服务器内部错误!"),
    SERVICE_UNAVAILABLE(503, "服务器正忙，请稍后再试!"),
    PARAM_ERROR(506, "参数异常!"),
    UNKNOWN(10000, "未知异常!"),
    IS_NOT_NULL(10001,"不能为空");

    private Integer code;
    private String msg;
    ExceptionEnum(Integer code, String msg){
        this.code = code;
        this.msg = msg;
    }
    public String getMsg(){
        return msg;
    }
    public Integer getCode(){
        return code;
    }
}
